<!--
 * @Author: xuhong
 * @Date: 2020-04-28 08:33:34
 * @LastEditTime: 2020-05-06 21:53:03
 * @FilePath: \my-admin\src\pages\Administrator\studentImport.vue
 -->

<template>
  <div class="page_student">
      <div class="student_header flex justify-content">
          <div class="header_right">
                <el-button type="primary">创建班级</el-button>
                <el-button type="primary">选择班级</el-button>
                <el-button type="primary">导入学生信息</el-button>
          </div>
          <div class="header_left flex-sub flex justify-end">
                <el-button type="danger">excel批量导入学生信息</el-button>
                <el-button type="danger">excel批量下载学生信息</el-button>
          </div>
      </div>
      <div class="student_content margin-top">
            <el-table
                :data="studentObj"
                border
                class="table"
                header-cell-class-name="table-header"
                style="width: 100%">
                <el-table-column
                    prop="stuNo"
                    label="学号"
                    width="140">
                </el-table-column>
                <el-table-column
                    prop="stuName"
                    label="姓名"
                    width="120">
                </el-table-column>
                <el-table-column
                    prop="sex"
                    label="性别"
                    width="60">
                </el-table-column>
                <el-table-column
                    prop="tel"
                    label="联系方式"
                    width="140">
                </el-table-column>
                <el-table-column
                    prop="stuAdress"
                    label="地址"
                    width="220">
                </el-table-column>
                <el-table-column
                    prop="stuBirthday"
                    label="出生日期"
                    width="140">
                </el-table-column>
                <el-table-column
                    prop="enrolledDate"
                    label="入校日期"
                    width="140">
                </el-table-column>
                <el-table-column
                    prop="postCode"
                    label="邮编"
                    width="80">
                </el-table-column>
                <el-table-column label="操作">
                    <template slot-scope="scope">
                        <el-button
                        size="mini"
                        @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                        <el-button
                        size="mini"
                        type="danger"
                        @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
      </div>
  </div>
</template>

<script>
export default {
    data(){
        return {
            studentObj:[
                {
                    no:201661544,
                    stuNo:201661544,
                    stuName:'余欢水',
                    sex:'男',
                    state:'在校',
                    classNo:'1',
                    tel:'13720260143',
                    stuAdress:"湖北省武汉市新洲区三店街道",
                    stuBirthday:"1998-04-05",
                    enrolledDate:"2016615-44",
                    postCode:"400100"
                }
            ]
        }
    },
    mounted(){
        let obj = this.studentObj[0]
        for(let i = 0; i < 100; i++){
            this.studentObj.push(obj)
        }
    }
}
</script>

<style lang="less">
@import "../../style/commonality";
.el-table .cell {
    text-align: center;
}
</style>